function drawGenderBarChart(){
    const types = ['神经性', '外倾性', '开放性', '宜人性', '尽责性'];

    var bar_chart = echarts.init(document.getElementById('genderBarChart'));

    const rawData = [
        [ 2.76, 3.23, 3.26, 3.62, 3.39],
        [ 2.86,  3.24,  3.24,  3.67,  3.32]
    ];
    const totalData = [];
    for (let i = 0; i < rawData[0].length; ++i) {
        let sum = 0;
        for (let j = 0; j < rawData.length; ++j) {
        sum += rawData[j][i];
        }
        totalData.push(sum);
    }
    const grid = {
        left: 100,
        right: 100,
        top: 50,
        bottom: 50
    };
    const series = [
        '男',
        '女'
    ].map((name, sid) => {
        return {
        name,
        type: 'bar',
        stack: 'total',
        barWidth: '60%',
        label: {
            show: true,
            formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
        },
        data: rawData[sid].map((d, did) =>
            totalData[did] <= 0 ? 0 : d / totalData[did]
        )
        };
    });
    option = {
        color: ['#67ADB7', '#F5ADB8'],
        legend: {
        selectedMode: false
        },
        grid,
        yAxis: {
        type: 'value'
        },
        xAxis: {
        type: 'category',
        data: types
        },
        series
    };
    // 设置图表选项
    bar_chart.setOption(option);
};